1. Field of the Invention
This invention relates to methods of scheduling of polling packets for a telecommunications device using a telecommunications protocol, especially a wireless protocol, such as POLL packets of Bluetooth devices, to apparatus and software for carrying out such methods, and in particular to scheduling polling packets when a telecommunications device such as a Bluetooth device is master of a radio link in Sniff mode.
2. Description of the Related Art
Bluetooth is a well known short-range radio link intended to replace the cable(s) connecting portable and/or fixed electronic devices. Full details are available from Bluetooth SIG which has its global headquarters in Overland Park, Kans., USA. Key features are robustness, low complexity, low power, and low cost. Bluetooth operates in the unlicensed ISM band at 2.4 GHz. A frequency hop transceiver is applied to combat interference and fading. A slotted channel is applied with a nominal slot length of 625 μs. On the channel, information is exchanged through packets. In Bluetooth version 1.1 each packet is transmitted on a different hop frequency. In Bluetooth version 1.2 it is proposed that transmission and receive packets may be sent on the same frequency. The Bluetooth protocol uses a combination of circuit and packet switching. Slots can be reserved for synchronous packets.
The Bluetooth system can provide a point-to-point connection (only two Bluetooth units involved), or a point-to-multipoint connection. In the point-to-multipoint connection, the channel is shared among several Bluetooth units. Two or more units sharing the same channel form a piconet. One Bluetooth unit acts as the master of the piconet, whereas the other unit(s) acts as slave(s). Up to seven slaves can be active in the piconet. In addition, many more slaves can remain locked to the master in a so-called parked state. These parked slaves cannot be active on the channel, but remain synchronized to the master. Both for active and parked slaves, the channel access is controlled by the master. Units can also be in a hold mode or a sniff mode.
Similar to the hold mode, a slave in park or sniff mode periodically wakes up to listen to transmissions from the master and to re-synchronize its clock offset. In the sniff mode, the duty cycle of the slave's listening activity can be reduced. If a slave participates on a link, it has to listen in every slot to the master traffic. With the sniff mode, the time slots where the master can start transmission to a specific slave is reduced; that is, the master can only start transmission in specified time slots. These so-called sniff slots are spaced regularly with an interval of Tsniff. Thus, the sniff mode may be described as the provision of periodic moments in time when communication from the master can occur, these times being at longer intervals than available during normal operation. The slave starts listening at the sniff slots for Nsniff attempt consecutive receive slots unless a packet with matching address is received. After every reception of a packet with matching address, the slave continues listening at the subsequent Nsniff timeout or remaining of the receive slots, whichever is greater. So, for Nsniff timeout >0, the slave continues listening as long as it receives packets with matching address. To enter the sniff mode, the master or slave can issue a sniff command message. This message will contain the sniff interval Tsniff and an offset Dsniff. The timing of the sniff mode is then determined. It is known to vary the parameters Tsniff and Nsniff according to backlogs of data to be transmitted between each of a number of different slaves, to save overall power consumption of the slaves. In Bluetooth version 1.2 the Nsniff timeout is used after the slave has transmitted a data packet. The Nsniff timeout is not used when only POLL/NULL packets have been exchanged.
NULL packets can be sent by a master and used by the slave to maintain synchronization. The POLL packet is very similar to the NULL packet. It does not have a payload either. In contrast to the NULL packet, it requires a confirmation from the recipient. Upon reception of a POLL packet the slave must respond with a packet. This return packet is an implicit acknowledgement of the POLL packet. The Poll packet can be used by the master in a piconet to poll the slaves, which must then respond even if they do not have information to send.
Synchronization is important for ad-hoc connections. In the Bluetooth system, each unit has a free-running native clock which has an accuracy of 20 ppm when the unit is active and 250 ppm when the unit is in a low-power mode. When a unit wants to page another unit, it can speed up the connection establishment when it knows the recipient's native clock. This clock information should be stored during a previous connection stage. A Bluetooth unit can thus have a list of unit addresses with corresponding native clocks it can use when paging one of those units. The clock information is stored as a time offset to its own native clock. When a piconet is in operation, it is the native clock in the master that determines the timing. The slaves add an offset to their native clocks in order to be hop synchronized to the master. The slave's native clock plus the offset with respect to the master provide the proper input to the hop selection scheme. Since the native clocks of the master and the slave are free-running, the offset in the slaves has to be adjusted continuously to compensate for drift. The reception of packets sent by the master is used to adjust the offset. The access code in front of the packet has the proper autocorrelation properties to enable a slave to derive the timing.
A master needs to send a poll packet occasionally, to maintain its awareness of other slaves within range, and to maintain synchronization of such slaves. The number of poll packets sent should be kept to a minimum to avoid the power cost of causing these slaves to have to transmit. Transmitting usually costs more power than receiving and so contributes to draining the batteries of units which are presumably trying to save power by being in the sniff mode. Where resources are scarce and must be used in an efficient way the ratio of the number of POLL and NULL packets to the number of data packets should be minimized. Besides this efficiency goal, a polling master in Bluetooth should also be fair. In the Bluetooth best effort case, fairness implies that slaves get the same fraction of their fair share of communication time where the fair share is determined by rules.
For scheduling POLL packets during Sniff mode, several scheduling algorithms are known and are in use in commercially available devices. The more advanced algorithms stop scheduling POLL packets (and start scheduling NULL packets) in the sniff attempts when the slave has synchronized (i.e. when the slave did respond with a NULL packet). In other words when the slave has synchronized, it is sufficient to send NULL packets for the remaining master Tx slots of the sniff attempts. This algorithm is not suitable for implementations that are using a “prescheduling algorithm”. In “prescheduling implementations”, Tx/Rx packet pairs are allocated in advance. For a master (using a prescheduling algorithm) of a Bluetooth link in sniff mode, this means that the master does not know in advance (i.e. at the time the actual scheduling occurs) when the slave will be synchronized. One possible solution to this problem is to send POLL packets in every Tx slot of the Sniff attempts, but this costs transmit power at the slave side (since the slave is obliged to respond to POLL packets).